package com.cn.lf.wx.dacs.bussiness.author.dao;

import com.cn.lf.wx.dacs.bussiness.author.entity.AuthRoleMenu;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 * 将角色和菜单关联 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2022-03-01
 */
@Mapper
public interface AuthRoleMenuMapper extends BaseMapper<AuthRoleMenu> {

	@Insert("<script>" +
            "INSERT INTO auth_role_menu (id, role_id, menu_id) VALUES " +
            "    <foreach collection=\"list\" separator=\",\" item=\"item\">" +
            "        (#{item.id},#{item.roleId},#{item.menuId}) " +
            "    </foreach>" +
            "</script>")
    int insertAll(List<AuthRoleMenu> roleMenus);
}
